﻿@model Century.Models.Common.FAQ
<div>@Html.HiddenFor(m => m.Id)</div>
<div>
    Application</div>
<div>@Html.DropDownListFor(m => m.Type, new SelectList((System.Collections.IEnumerable)ViewBag.FAQType, "Value", "Text"))</div>
<br />
<div id="SectionLabel">
    Section</div>
<div>@Html.TextBoxFor(r => r.Section)</div>
<div>
    Question</div>
<div>@Html.EditorFor(m => m.Question, new { style = "width: 1000px" })</div>
<div>
    Answer</div>
<div>@Html.EditorFor(m => m.Answer)</div>
<script type="text/javascript">
    if ($('#Type').val() == 0) {
        $('#Section').hide();
        $('#SectionLabel').hide();
    }
    else {
        $('#Section').show();
        $('#SectionLabel').show();
    }
    $('#Type').change(function () {
        if ($('#Type').val() == 0) {
            $('#Section').hide();
            $('#SectionLabel').hide();
        }
        else {
            $('#SectionLabel').show();
            $('#Section').show();
        }
    });
</script>
